{% load debate_tags participant_link i18n %}

{# Position, teams and room #}
<div class="list-group-item lead {% if draw_released %}active{% else %}list-group-item-dark{% endif %}">

  {# (Two-team formats) #}
  {% if pref.teams_in_debate == 'two' %}
    {% team_record_link debate.aff_team admin_page tournament as aff %}
    {% team_record_link debate.neg_team admin_page tournament as neg %}

    {% if debate.adjudicators|length > 1 and debateadjudicator.type == debateadjudicator.TYPE_CHAIR %}
      {% if grammatical_person == "3" %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with adjudicator=adjudicator.name room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            {{ adjudicator }} is the <strong>chair</strong> adjudicating {{ aff }} vs {{ neg }} in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with adjudicator=adjudicator.name room=debate.venue.display_name|default:venue_tba %}
            {{ adjudicator }} is the <strong>chair</strong> adjudicating {{ aff }} vs {{ neg }} in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% else %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            You are the <strong>chair</strong> adjudicating {{ aff }} vs {{ neg }} in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with room=debate.venue.display_name|default:venue_tba %}
            You are the <strong>chair</strong> adjudicating {{ aff }} vs {{ neg }} in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% endif %}
    {% elif debate.adjudicators|length > 1 %}
      {% if grammatical_person == "3" %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with adjudicator=adjudicator.name type=debateadjudicator.get_type_display room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            {{ adjudicator }} is a <strong>{{ type }}</strong> adjudicating {{ aff }} vs {{ neg }} in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with adjudicator=adjudicator.name type=debateadjudicator.get_type_display room=debate.venue.display_name|default:venue_tba %}
            {{ adjudicator }} is a <strong>{{ type }}</strong> adjudicating {{ aff }} vs {{ neg }} in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% else %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with type=debateadjudicator.get_type_display room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            You are a <strong>{{ type }}</strong> adjudicating {{ aff }} vs {{ neg }} in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with type=debateadjudicator.get_type_display room=debate.venue.display_name|default:venue_tba %}
            You are a <strong>{{ type }}</strong> adjudicating {{ aff }} vs {{ neg }} in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% endif %}
    {% else %}
      {% if grammatical_person == "3" %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with adjudicator=adjudicator.name room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            {{ adjudicator }} is adjudicating {{ aff }} vs {{ neg }} in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with adjudicator=adjudicator.name room=debate.venue.display_name|default:venue_tba %}
            {{ adjudicator }} is adjudicating {{ aff }} vs {{ neg }} in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% else %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            You are adjudicating {{ aff }} vs {{ neg }} in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with room=debate.venue.display_name|default:venue_tba %}
            You are adjudicating {{ aff }} vs {{ neg }} in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% endif %}
    {% endif %}

  {# (British Parliamentary) #}
  {% elif pref.teams_in_debate == 'bp' %}

    {% if debate.adjudicators|length > 1 and debateadjudicator.type == debateadjudicator.TYPE_CHAIR %}
      {% if grammatical_person == "3" %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with adjudicator=adjudicator.name room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            {{ adjudicator }} is the <strong>chair</strong> adjudicating in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with adjudicator=adjudicator.name room=debate.venue.display_name|default:venue_tba %}
            {{ adjudicator }} is the <strong>chair</strong> adjudicating in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% else %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            You are the <strong>chair</strong> adjudicating in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with room=debate.venue.display_name|default:venue_tba %}
            You are the <strong>chair</strong> adjudicating in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% endif %}
    {% elif debate.adjudicators|length > 1 %}
      {% if grammatical_person == "3" %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with adjudicator=adjudicator.name type=debateadjudicator.get_type_display room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            {{ adjudicator }} is a <strong>{{ type }}</strong> adjudicating in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with adjudicator=adjudicator.name type=debateadjudicator.get_type_display room=debate.venue.display_name|default:venue_tba %}
            {{ adjudicator }} is a <strong>{{ type }}</strong> adjudicating in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% else %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with type=debateadjudicator.get_type_display room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            You are a <strong>{{ type }}</strong> adjudicating in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with type=debateadjudicator.get_type_display room=debate.venue.display_name|default:venue_tba %}
            You are a <strong>{{ type }}</strong> adjudicating in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% endif %}
    {% else %}
      {% if grammatical_person == "3" %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with adjudicator=adjudicator.name room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            {{ adjudicator }} is adjudicating in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with adjudicator=adjudicator.name room=debate.venue.display_name|default:venue_tba %}
            {{ adjudicator }} is adjudicating in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% else %}
        {% if debate.venue.url %}
          {% blocktrans trimmed with room=debate.venue.display_name|default:venue_tba url=debate.venue.url %}
            You are adjudicating in <a href="{{ url }}"><strong>{{ room }}</strong></a>.
          {% endblocktrans %}
        {% else %}
          {% blocktrans trimmed with room=debate.venue.display_name|default:venue_tba %}
            You are adjudicating in <strong>{{ room }}</strong>.
          {% endblocktrans %}
        {% endif %}
      {% endif %}
    {% endif %}
  {% endif %}

</div>

{% include "current_round/common.html" %}
